import st7789py as st7789
from machine import SPI,Pin,UART
import machine
import time
import gc
import struct


#LCD 初始化
spi = SPI(2, baudrate=20000000, polarity=1, sck=Pin(12), mosi=Pin(13))
tft = st7789.ST7789(spi, 240, 240, reset=Pin(15, Pin.OUT), dc=Pin(14, Pin.OUT),backlight=Pin(2,Pin.OUT))
tft.fill(st7789.BLUE)
f=open("a.rgb","rb")
q=f.read()

tft.fill(st7789.BLUE)
c=time.ticks_ms()
tft.blit_buffer(q,0,0,240,240)
print("240x240",time.ticks_ms()-c)

